﻿using BlueDot.Mobile.Core;

namespace NavigationSample.UI
{
    public partial class FullView : ViewBase
    {
        #region Fields

        private const string FullViewShowingAddress = WellKnownActions.ViewShowing + "/FullView";
        private IShell shell;

        #endregion

        #region Constructors

        public FullView()
        {
            InitializeComponent();
        }

        [DependencyConstructor]
        public FullView(IMobileApplication application)
            : base(application)
        {
            InitializeComponent();
        }

        #endregion

        #region Properties

        [DependencyProperty]
        public IShell Shell
        {
            set { shell = value; }
        }

        #endregion

        #region public

        [Receiver(FullViewShowingAddress)]
        public void FullViewShowing(object sender, DataEventArgs<IView> e)
        {
            shell.ResetDisplayPanel();
        }

        #endregion
    }
}